Page({
    data: {
        // Mustache语法
        message: 'hello world',
        firstname: 'kobe',
        lastname: 'bryant',
        date: new Date().toLocaleDateString(),

        // wx:if hidden
        score: 88,
        isHidden: false,

        // 列表渲染
        books: [
            { id: 111, name: '代码大全', price: 98 },
            { id: 112, name: '你不知道的javaScript', price: 87 },
            { id: 113, name: 'javaScript高级设计', price: 76 },
        ]
    },
    onChangeTap() {
        this.setData({
            isHidden: !this.data.isHidden
        })
    }
})